
public class StringDemo {
	public static void main(String[] args) {
		String strBody = "(FNS,BT,000020)";
		String shour = strBody.substring(8, 10);
		String sminus = strBody.substring(10, 12);
		String sseconds = strBody.substring(12, 14);
		System.out.println(shour);
		System.out.println(sminus);
		System.out.println(sseconds);
		strBody = "(FNS,BS1)";
		String res = strBody.substring(7, strBody.length() - 1);
		System.out.println(res);
		
		strBody = "(FNS,CRD,012345,23)";
		String tempStr = strBody.substring(9);
		String rfid = tempStr.substring(0, tempStr.indexOf(","));
		String validTime = tempStr.substring(tempStr.lastIndexOf(","), tempStr.length()-1);
		System.out.println("rfid:"+rfid+";validTime:"+validTime);
		
		
		String s ="ssss";
		s.hashCode();
		
		s = "粤SN5U49";
		if(s.length()==7){
			String plate_no = s.substring(0, 2)+"."+s.substring(2);
			System.out.println(plate_no);
		}
		
		s = "粤SN5U49粤SN5U49粤SN5U49";
		
		System.out.println(s.substring(0,20));
		
		s = "13800000001";
		System.out.println("hash 13800000001:"+s.hashCode());
		s = "13800000002";
		System.out.println("hash 13800000002:"+s.hashCode());
		
		s = "1";
		System.out.println("hash 1:"+s.hashCode());
		
		
		
		
		s= "89860116627100174186";
		System.out.println(s.substring(0, 14));
		
	}
}
